<?php

class Persion {
    public $name = 'lisi';
    public $age = 22;

    public function __construct($name='',$age=0)
    {
        echo '有对象被创建了';
        $this->name=$name;
        $this->age = $age;
    }
    public function __destruct()
    {
        echo '有对象被销毁了';
    }
}

$p1 = new Persion('lisi',25);

print('<hr />');
unset($p1);
$p1 = 30;
print('<hr />');
print($p1);
